module ActivitiesHelper
  
  def status_for(activity)
    if activity.completed_at
      content_tag :span, t(:done, :scope => [:activity, :status], :class => "mini-alert green rounded-4 width-50")
    elsif Date.yesterday <= activity.created_at.to_date
      content_tag :span, t(:new, :scope => [:activity, :status], :class => "mini-alert darkest rounded-4 width-50")
    else
      content_tag :span, t(:open, :scope => [:activity, :status], :class => "mini-alert light-blue rounded-4 width-50")
    end
  end
  
end
